home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PCTV3N3 / SCROLL.FRM (.txt) < prev    next >
Visual Basic Form  |  1992-06-09  |  5KB  |  131 lines

  1.     frmScroll
  2. Scrollable picture viewer
  3. $    frmScroll
  4. pboxView
  5. pboxHold
  6.         pboxImage
  7. VScroll1
  8. HScroll1    
  9. Form_Click
  10. TRUE,
  11. FALSE
  12. @    Form_Load
  13. pboxHoldV
  14. pboxView
  15. Visible_
  16. FLASE
  17. picture
  18. Form_Resize=
  19. pboxr
  20. ScaleWidthP
  21. VScroll
  22. Width
  23. ScaleHeight
  24. HScroll
  25. Height
  26. VScroll1
  27. HScroll1
  28. leftj
  29. Enabled
  30. LargeChange9
  31. HScroll1_Change
  32. Valueo
  33. VScroll1_Change
  34. BorderStyler
  35. HScroll1_LostFocus
  36. pboxView_Click
  37. FileName;
  38. whenever
  39. resized
  40. SmallChange
  41. heightScaleHeight
  42. BoxWidthx
  43.     BoxHeight
  44. sting
  45.     pboxImage
  46. Syntaxy
  47. StretchBltT
  48. hDestDC
  49. nWidth
  50. nHeight
  51. hSrcDC
  52. YSrc]
  53.     nSrcWidth$
  54. nSrcHeighte
  55. dwRop
  56.     nDstWidth
  57. nDstHeight
  58.     SaleWidth[
  59. hDstDCo
  60. Result
  61. byvalX,
  62. Image
  63. SetStretchBltMode
  64. text1
  65. SRCCOPY
  66. LoadPicture
  67. Pictrure
  68. explicit
  69. SLEEPx
  70. pboxImage_Click
  71. pboxold
  72. Form_Paint
  73. pboxImage_GotFocus
  74. leaving
  75.     displayed
  76. vertically
  77. edges
  78. destination
  79. DstWidth
  80.     DstHeight
  81. SrcWidth
  82.     SrcHeight<
  83.  SCROLL.FRMi
  84.  Demonstration of a scrollable picture viewer.
  85.  Declarations for Windows API functions.
  86. Form_Load
  87.  When the form is loaded, load the desired picture file.
  88.  Insert your own bitmap file or Windows metafile path andd
  89.  name.
  90. A:my.bmp
  91.  Check for errors.
  92. File "
  93.  not found."
  94. Error retrieving "
  95. Form_Resize
  96.  This event procedure is executed when the form is first
  97.  displayed and whenever it is resized.
  98.  Insure that the form is 1.6 times as wide as it is high..
  99.  Move the child picture box to the upper
  100.  left corner of the form.o
  101.  Move the parent picture box to the top left of the
  102.  form. Make it square, large enough to fill the form
  103.  vertically, leaving room for the horizontal scroll bar.
  104.  Position the scroll bars at the the bottom andd
  105.  right edges of the parent picture box.t
  106.  Set the horizontal scroll bar Max property so that full travell
  107.  of the scroll bar represents scrolling across the full widthh
  108.  of the picture.
  109.  Do the same for the vertical scroll bar..
  110.  Set the scroll bar change properties so that a large change
  111.  scrolls a distance equal to the width or height of thee
  112.  viewing window, and a small change scrolls 1/10th off
  113.  a large change.
  114.  Enable the horizontal scroll bar only if the full width
  115.  of the picture is not already showing.
  116.  Enable the vertical scroll bar only if the full heighth
  117.  of the picture is not already showing.i
  118.  Place pboxImage in the center of the blank area
  119.  on the right side of the form.
  120.  Copy/compress the image to pboxImage.
  121.  Use StretchBlt copy method to &HCC0020 so that source
  122.  is copied to destination with no special transformations.
  123.  Set StretchBlt mode to ColorOnColor (2) for best copy off
  124.  a color image..
  125. HScroll1_Change
  126.  Move the child picture box to reflect the new positionn
  127.  of the horizontal scroll bar.
  128. VScroll1_Change
  129.  Move the child picture box to reflect the new positionn
  130.  of the vertical scroll bar.
  131.